package com.fl.springcloud.service;

import com.fl.springcloud.entities.CommonResult;
import com.fl.springcloud.entities.PayMent;
import org.springframework.stereotype.Component;

@Component
public class PaymentHystrixService implements PaymentFeignService
{
    @Override
    public CommonResult<PayMent> getPayment(Long id) {
        return new CommonResult<>(500,"调用查询服务出错！请稍后再试。");
    }

    @Override
    public CommonResult save(PayMent payMent) {
        return new CommonResult<>(500,"调用新增订单服务出错！请稍后再试。");
    }

    @Override
    public String PaymentFeignTimeout() {
        return "feign超时服务出错，请稍后再试！";
    }

    @Override
    public String payment_ok(Integer id) {
        return "PaymentHystrixService =>payment_ok--出错！，请稍后再试！";
    }

    @Override
    public String payment_timeout(Integer id) {
        return "PaymentHystrixService =>payment_timeout--出错！，请稍后再试！";
    }

    @Override
    public void zipkin() {
        System.out.println("调用zipkin出错！");
    }
}
